*********************************************************************************************************************** ** Human Development Report Office (HDRO), United Nations Development Programme ** Multidimensional Poverty Index 2022 release ** Methodology developed in partnership with the Oxford Poverty and Human Development Initiative, University of Oxford ************************************************************************************************************************ /* FOR JAMAICA: Raw dta files that we will be using in JSLC 2018: anthro18 Section C - Children anthropometrics rec001 Cover Data - gives you the weights rec003 Section R - Roster : list all members of each household, and relation with hh head. rec004 Section A - Health rec005 Section B - Education rec017 Section I - Housing and Related Expenses rec018 Section J - Inventory of Durable Goods Household Population Data. Its important to review the Survey Questionnaire, the dataset description, dictionary and each raw data set. This is because several variables and coding of those variables could change between year. */ clear all set more off set maxvar 10000 *** Working Folder Path *** global path_in "C:\Users\cecilia.calderon\Documents\HDRO_MCC\MPI\MPI 2.0\Jamaica 2018_JSLC\SLC 18\" global path_out "C:\Users\cecilia.calderon\Documents\HDRO_MCC\MPI\MPI 2.0\Jamaica 2018_JSLC\SLC 18\" global path_ado "C:" ******************************************************************************** *** JAMAICA JSLC 2018 *** ******************************************************************************** ******************************************************************************** *** Step 1: Data preparation ******************************************************************************** /* Jamaica JSLC 2018: Anthropometric information were recorded for all children 0-59 months */ ******************************************************************************** *** Step 1.1 CHILDREN UNDER 5 RECODE ******************************************************************************** *use "$path_in/rec006_nutri.dta", clear 'rec006_nutri' does not have the sex variable use "$path_in/anthro18.dta", clear *** Generate individual unique key variable required for data merging *** serial=household number; *** ind=child's line number in household; gen double ind_id = serial*100 + ind format ind_id %20.0g label var ind_id "Individual ID" duplicates report ind_id //0 duplicates *drop if c1_yy==0 gen child_KR=1 //Generate identification variable for observations in KR recode *** Next, indicate to STATA where the igrowup_restricted.ado file is stored: ***Source of ado file: http://www.who.int/childgrowth/software/en/ adopath + "C:\Users\cecilia.calderon\Documents\HDRO_MCC\MPI\WHO igrowup STATA\" *** We will now proceed to create three nutritional variables: *** weight-for-age (underweight), *** weight-for-height (wasting) *** height-for-age (stunting) /* We use 'reflib' to specify the package directory where the .dta files containing the WHO Child Growth Standards are stored. Note that we use strX to specify the length of the path in string. If the path is long, you may specify str55 or more, so it will run. */ gen str100 reflib="C:\igrowup_stata" lab var reflib "Directory of reference tables" /* We use datalib to specify the working directory where the input STATA dataset containing the anthropometric measurement is stored. */ gen str100 datalib = "$path_out" lab var datalib "Directory for datafiles" /* We use datalab to specify the name that will prefix the output files that will be produced from using this ado file (datalab_z_r_rc and datalab_prev_rc)*/ gen str30 datalab = "children_nutri_jam" lab var datalab "Working file" *** Next check the variables that WHO ado needs to calculate the z-scores: *** sex, age, weight, height, measurement, oedema & child sampling weight *** Variable: SEX *** tab sex, miss * "1" for male ;"2" for female clonevar gender = sex desc gender tab gender *** Variable: AGE *** tab age, m clonevar age_months = age sum age_months gen str6 ageunit = "months" lab var ageunit "Months" *** Variable: BODY WEIGHT (KILOGRAMS) *** *codebook c10, tab (999) *gen weight = c10 *tab c10 ,m nol *tab c9 c10 if c10==., miss *c9: result of the measurement desc weight sum weight *** Variable: HEIGHT (CENTIMETERS) *codebook c11, tab (999) *gen height = c11 *tab c11,m nol *tab c9 c11 if c11==., miss desc height sum height *** Variable: MEASURED STANDING/LYING DOWN codebook isrecumbent //How was the at the measurement 1 "lying down" 2 "Standing up" gen measure = "l" if isrecumbent==1 //Child measured lying down replace measure = "h" if isrecumbent==0 //Child measured standing up replace measure = " " if isrecumbent==. //Replace with " " if unknown tab measure isrecumbent,m *** Variable: OEDEMA *** lookfor oedema gen oedema = "n" //It assumes no-one has oedema desc oedema tab oedema *** Variable: INDIVIDUAL CHILD SAMPLING WEIGHT *** //Not available for JSLC, so created sw=1 gen sw = weightingfactor desc sw sum sw /*We now run the command to calculate the z-scores with the adofile */ igrowup_restricted reflib datalib datalab gender age_months ageunit weight height measure oedema sw /*We now turn to using the dta file that was created and that contains the calculated z-scores */ use "$path_out/children_nutri_jam_z_rc.dta", clear *** Standard MPI indicator *** //Takes value 1 if the child is under 2 stdev below the median & 0 otherwise gen underweight = (_zwei < -2.0) replace underweight = . if _zwei == . | _fwei==1 lab var underweight "Child is undernourished (weight-for-age) 2sd - WHO" tab underweight [aw=sw] gen stunting = (_zlen < -2.0) replace stunting = . if _zlen == . | _flen==1 lab var stunting "Child is stunted (length/height-for-age) 2sd - WHO" tab stunting [aw=sw] gen wasting = (_zwfl < - 2.0) replace wasting = . if _zwfl == . | _fwfl == 1 lab var wasting "Child is wasted (weight-for-length/height) 2sd - WHO" tab wasting [aw=sw] //Retain relevant variables: keep serial ind ind_id child_KR sw underweight* stunting* wasting* order serial ind ind_id child_KR sw underweight* stunting* wasting* sort serial ind save "$path_out/JAM18_KR.dta", replace //Erase files from folder: erase "$path_out/children_nutri_jam_z_rc.xls" erase "$path_out/children_nutri_jam_prev_rc.xls" *erase "$path_out/children_nutri_jam_z_rc.dta" ******************************************************************************** *** Step 1.2 HOUSEHOLD MEMBER'S RECODE ******************************************************************************** use "$path_in/rec003.dta", clear gen double hh_id = serial format hh_id %20.0g label var hh_id "Household ID" codebook hh_id gen double ind_id = serial*100+ ind format ind_id %20.0g label var ind_id "Individual ID" codebook ind_id sort serial ind ******************************************************************************** *** 1.3 DATA MERGING ********************************************************************************* merge m:1 serial using "$path_in/rec001.dta", nogen *Data at hh level *merge m:1 serial using "$path_in/rec017.dta", nogen //Housing and related expenses at hh level *merge m:1 serial using "$path_in/rec018.dta", nogen *Inventory of durable good at hh level merge m:1 serial using "$path_in/hhsizes.dta", nogen *Household size at hh level merge 1:1 serial ind using "$path_in/rec005_edu.dta", nogen *Education at individual level merge m:1 serial using "$path_in/rec014_housing.dta", nogen *Housing merge m:1 serial using "$path_in/rec015_housing2.dta", nogen *Housing merge 1:1 serial ind using "$path_out/JAM18_KR.dta", nogen *Measured children data at individual level sort serial ind ******************************************************************************** *** Step 1.4 KEEPING ONLY DE JURE HOUSEHOLD MEMBERS *** ******************************************************************************** drop if hhmember==2 /* No longer a member */ ******************************************************************************** *** 1.5 RENAMING DEMOGRAPHIC VARIABLES *** ******************************************************************************** //Sample weight desc finwght clonevar weight = finwght //Area: urban or rural desc area rename area region_c gen area = region_c recode area (3=0) (2=1) label define lab_area 1 "urban" 0 "rural" label values area lab_area label var area "Area: urban-rural" tab area region_c, m //Relationship to the head of household clonevar relationship = relat /*codebook relationship, tab (20) recode relationship (1=1)(2=2)(3=3)(4/7=4)(9=5)(8=6) label define lab_rel 1"head" 2"spouse" 3"child" 4"extended family" 5"not related" 6"maid" label values relationship lab_rel label var relationship "Relationship to the head of household" tab relat relationship, m no codes available in the questionnaire */ //Sex of household member label define lab_sex 1 "male" 2 "female" label values sex lab_sex ta sex, m //Age of household member gen age = ageyrs //Age group recode age (0/4 = 1 "0-4")(5/9 = 2 "5-9")(10/14 = 3 "10-14") (15/17 = 4 "15-17")(18/59 = 5 "18-59")(60/max=6 "60+"), gen(agec7) lab var agec7 "age groups (7 groups)" recode age (0/9 = 1 "0-9") (10/17 = 2 "10-17")(18/59 = 3 "18-59") (60/max=4 "60+"), gen(agec4) lab var agec4 "age groups (4 groups)" recode age (0/17 = 1 "0-17") (18/max = 2 "18+"), gen(agec2) lab var agec2 "age groups (2 groups)" //Marital status of household member clonevar marital = marital_stat codebook marital, tab (20) recode marital (1=2)(2=1)(3=4)(4=5)(5=3)(97/99=.) label define lab_mar 1"never married" 2"currently married" 3"widowed" 4"divorced" 5"not living together" label values marital lab_mar label var marital "Marital status of household member" replace marital_stat=. if marital_stat==0 tab marital_stat marital, m //Total number of hh members in the household gen member = 1 bysort hh_id: egen hhsize = sum(member) label var hhsize "Household size" tab hhsize, m drop member compare hhsize hhsize1 compare hhsize hhsize2 //Subnational region gen region = parish codebook region, tab (99) lab define lab_region 1 "Kingston" 2 "St. Andrew" 3 "St. Thomas" 4 "Portland" 5 "St. Mary" 6 "St. Ann" 7 "Trelawny" 8 "St. James" 9 "Hanover" 10 "Westmoreland" 11 "St. Elizabeth" 12 "Manchester" 13 "Clarendon" 14 "St. Catherine" lab values region lab_region lab var region "Region for subnational decomposition" ******************************************************************************** *** Step 2 Data preparation *** *** Standardization of the 10 Global MPI indicators *** Identification of non-deprived & deprived individuals ******************************************************************************** ******************************************************************************** *** Step 2.1 Years of Schooling *** ******************************************************************************** * b20 = school level * b21 = grade completed * b23 = yrs of schooling * https://education.stateuniversity.com/pages/732/Jamaica-NONFORMAL-EDUCATION.html replace b20=. if b20==0 gen eduyears = 0 if b20==1 | b20==20 | (b20==2 & b21==0) | (b20==4 & b21==0) replace eduyears = 1 if (b20==2 & b21==1) | (b20==4 & b21==1)| (b20==5 & b21==1) replace eduyears = 2 if (b20==2 & b21==2) | (b20==4 & b21==2) | (b20==5 & b21==2) replace eduyears = 3 if (b20==2 & b21==3) | (b20==4 & b21==3) replace eduyears = 4 if (b20==2 & b21==4) | (b20==4 & b21==4) replace eduyears = 5 if (b20==2 & b21==5) | (b20==4 & b21==5) replace eduyears = 6 if (b20==2 & b21==6) | (b20==3 & b21==6) | (b20==4 & b21==6) | (b20==5 & b21==6) | (b20==9 & b21==0) replace eduyears = 7 if (b20==4 & b21==7) | (b20==5 & b21==7) | (b20==6 & b21==7) | (b20==7 & b21==7) | (b20==8 & b21==0) | (b20==9 & b21==7) | (b20==10 & b21==0) | (b20==11 & b21==7) replace eduyears = 8 if (b20==4 & b21==8) | (b20==5 & b21==8) | (b20==6 & b21==8) | (b20==7 & b21==8) | (b20==8 & b21==8) | (b20==9 & b21==8) | (b20==10 & b21==8) | (b20==11 & b21==8) replace eduyears = 9 if (b20==4 & b21==9) | (b20==5 & b21==9) | (b20==6 & b21==9) | (b20==7 & b21==9) | (b20==8 & b21==9) | (b20==9 & b21==9) | (b20==10 & b21==9) | (b20==11 & b21==9) replace eduyears = 10 if (b20==7 & b21==10) | (b20==8 & b21==10) | (b20==9 & b21==10) | (b20==10 & b21==10) | (b20==11 & b21==10) replace eduyears = 11 if (b20==7 & b21==11) | (b20==8 & (b21==11 | b21==12 | b21==13)) | (b20==9 & (b21==11 | b21==12 | b21==13 | b21==14)) | (b20==10 & (b21==11 | b21==12 | b21==13)) | (b20==11 & (b21==11 | b21==12 | b21==13)) replace eduyears = b23 if (b20==12 | b20==13 | b20==14) & b23<=25 replace eduyears = 0 if b20>=15 & b20<=19 * Assumes that adult education is not measured as formal schooling replace eduyears=b4-1 if b4>0 & b4<=13 & eduyears==. * those currently attending replace eduyears=b23 if b23>0 & b23<=25 & eduyears==. & (b1<15 | b1==19) replace eduyears=0 if eduyears==. & b1>=15 & b1<=18 replace eduyears=0 if b1==19 & b23==0 & eduyears==. replace eduyears = . if eduyears>=age & age>0 replace eduyears = 0 if age < 10 replace eduyears = 0 if (age==10 | age==11) & eduyears < 6 /* The variable "eduyears" was replaced with a '0' given that the criteria for this indicator is household member aged 12 years or older */ replace eduyears = 6 if b20==9 & eduyear==. * imputing /*A control variable is created on whether there is information on years of education for at least 2/3 of the household members. */ gen temp = 1 if (eduyears!=. & (age>=12 & age!=.)) | (((age==10 | age==11) & eduyears>=6 & eduyears<.)) bysort hh_id: egen no_missing_edu = sum(temp) /*Total household members who are 12 years and older with no missing years of education but recognizing as an achievement if the member is 10 or 11 and already completed 6 yrs of schooling */ gen temp2 = 1 if (age>=12 & age!=.) | (((age==10 | age==11) & eduyears>=6 & eduyears<.)) bysort hh_id: egen hhs = sum(temp2) *Total number of household members who are 12 years and older replace no_missing_edu = no_missing_edu/hhs replace no_missing_edu = (no_missing_edu>=2/3) /*Identify whether there is information on years of education for at least 2/3 of the household members aged 12 years and older */ tab no_missing_edu, miss label var no_missing_edu "No missing edu for at least 2/3 of the HH members aged 12 years & older" drop temp temp2 hhs /* The entire household is considered deprived if no household member aged 12 years or older has completed SIX years of schooling. */ gen years_edu6 = (eduyears>=6) /* The years of schooling indicator takes a value of "1" if at least someone in the hh has reported 6 years of education or more */ replace years_edu6 = . if eduyears==. bysort hh_id: egen hh_years_edu6_1 = max(years_edu6) gen hh_years_edu6 = (hh_years_edu6_1==1) replace hh_years_edu6 = . if hh_years_edu6_1==. replace hh_years_edu6 = . if hh_years_edu6==0 & no_missing_edu==0 lab var hh_years_edu6 "Household has at least one member with 6 years of edu" ta hh_years_edu6, m ******************************************************************************** *** Step 2.2 Child School Attendance *** ******************************************************************************** gen attendance = 1 if ((b1>=4 & b1<=11) | b1==13 | b1==14) & age>=6 & age<=14 //Currently attending formal education// replace attendance = 0 if (b1<=3 | b1==12 | (b1>=15 & b1<=19)) & age>=6 & age<=14 //Not attending school or attending below formal (primary) education// *** Standard MPI *** /*The entire household is considered deprived if any school-aged child is not attending school up to class 8. */ ******************************************************************* gen child_schoolage = (age>=6 & age<=14) /*Note: In Jamaica, the official school entrance age is 6 years. So, age range is 6-14 (=6+8) Source: http://data.uis.unesco.org/?ReportId=163 */ /*A control variable is created on whether there is no information on school attendance for at least 2/3 of the school age children */ count if child_schoolage==1 & attendance==. //Understand how many eligible school aged children are not attending school gen temp = 1 if child_schoolage==1 & attendance!=. /*Generate a variable that captures the number of eligible school aged children who are attending school */ bysort hh_id: egen no_missing_atten = sum(temp) /*Total school age children with no missing information on school attendance */ gen temp2 = 1 if child_schoolage==1 bysort hh_id: egen hhs = sum(temp2) //Total number of household members who are of school age replace no_missing_atten = no_missing_atten/hhs replace no_missing_atten = (no_missing_atten>=2/3) /*Identify whether there is missing information on school attendance for more than 2/3 of the school age children */ tab no_missing_atten, miss label var no_missing_atten "No missing school attendance for at least 2/3 of the school aged children" drop temp temp2 hhs bysort hh_id: egen hh_children_schoolage = sum(child_schoolage) replace hh_children_schoolage = (hh_children_schoolage>0) //Control variable: //It takes value 1 if the household has children in school age lab var hh_children_schoolage "Household has children in school age" gen child_not_atten = (attendance==0) if child_schoolage==1 replace child_not_atten = . if attendance==. & child_schoolage==1 bysort hh_id: egen any_child_not_atten = max(child_not_atten) gen hh_child_atten = (any_child_not_atten==0) replace hh_child_atten = . if any_child_not_atten==. replace hh_child_atten = 1 if hh_children_schoolage==0 replace hh_child_atten = . if hh_child_atten==1 & no_missing_atten==0 /*If the household has been intially identified as non-deprived, but has missing school attendance for at least 2/3 of the school aged children, then we replace this household with a value of '.' because there is insufficient information to conclusively conclude that the household is not deprived */ lab var hh_child_atten "Household has all school age children up to class 8 in school" tab hh_child_atten, m /*Note: The indicator takes value 1 if ALL children in school age are attending school and 0 if there is at least one child not attending. Households with no children receive a value of 1 as non-deprived. The indicator has a missing value only when there are all missing values on children attendance in households that have children in school age. */ ******************************************************************************** *** Step 2.3 Nutrition *** ******************************************************************************** ******************************************************************************** *** Step 2.3a Child Nutrition *** ******************************************************************************** /* As a first step, create the child eligibility criteria. Households that do not have eligible children, that is, children under 5, are identified as non- deprived */ *gen child_eligible = (child_KR==1) gen child_eligible = 0 replace child_eligible =1 if age<5 | child_KR==1 bys hh_id: egen hh_n_children_eligible = sum(child_eligible) //Number of eligible children for anthropometrics gen no_child_eligible = (hh_n_children_eligible==0) //Takes value 1 if there were no eligible children for anthropometrics lab var no_child_eligible "Household has no children eligible" tab no_child_eligible, m *** Child Underweight Indicator *** ************************************************************************ *** Child Either Underweight or Stunted Indicator *** ************************************************************************ *** Standard MPI *** gen uw_st = 1 if stunting==1 | underweight==1 replace uw_st = 0 if stunting==0 & underweight==0 bysort hh_id: egen temp = max(uw_st) gen hh_no_uw_st = (temp==0) //Takes value 1 if no child in the hh is underweight or stunted replace hh_no_uw_st = . if temp==. replace hh_no_uw_st = 1 if no_child_eligible==1 //Households with no eligible children will receive a value of 1 lab var hh_no_uw_st "Household has no child underweight or stunted" drop temp ******************************************************************************** *** Step 2.3c Household Nutrition Indicator *** ******************************************************************************** *** Standard MPI *** /* Members of the household are considered deprived if the household has a child under 5 whose height-for-age or weight-for-age is under two standard deviation below the median. Households that have no eligible children are considered non-deprived. */ ************************************************************************ gen hh_nutrition_uw_st = hh_no_uw_st lab var hh_nutrition_uw_st "Household has no child underweight or stunted" ******************************************************************************** *** Step 2.4 Child Mortality *** ******************************************************************************** /*NOTE: Jamaica JSLC 2018 has no data on child mortality. As such the indicators under this section is assigned with missing value */ gen child_mortality = . lab var child_mortality "Total child mortality within household" gen hh_mortality_5y = . lab var hh_mortality_5y "Household had no under 18 child mortality in the last 5 years" ******************************************************************************** *** Step 2.5 Electricity *** ******************************************************************************** *** Standard MPI *** /*Members of the household are considered deprived if the household has no electricity */ *************************************************** gen electricity = 1 if i36==0 | i36==1 | i36==2 | i36==3 /* 0 is not a category in the questionnaire but they report power outgages (i37) as in category 1 */ /* Main source of lightening assumes that they have no electricity when they use kerosene or other */ replace electricity = 0 if i36==4 | i36==5 |i36==6 label var electricity "Electricity" ta i37 i36, m ta i36 electricity, m ******************************************************************************** *** Step 2.6 Sanitation *** ******************************************************************************** *** Standard MPI *** /*Members of the household are considered deprived if the household's sanitation facility is not improved (according to the SDG guideline) or it is improved but shared with other households*/ ******************************************************************** gen toilet_mdg = 0 if i4==3 | i5==5 | i5==6 replace toilet_mdg = 1 if i5==1 | i5==2 | i5==3 | i5==4 /* pit included as improved to match the JMP data for Jamaica 2018 https://washdata.org/data/household#!/dashboard/new */ replace toilet_mdg = 0 if i6==2 lab var toilet_mdg "Household has improved sanitation with MDG Standards" tab i5 toilet_mdg, m ******************************************************************************** *** Step 2.7 Drinking Water *** ******************************************************************************** * i27 = water source * timetowater not available *** Standard MPI *** /* Members of the household are considered deprived if the household does not have access to improved drinking water (according to the SDG guideline) or safe drinking water is at least a 30-minute walk from home, roundtrip */ ******************************************************************** /* Note: In Jamaica, the National Water Commission (NWC) and the Ministry of Health restrict the definition of imporved drinking water sources to only treated water, that is, household connection (piped into yard/dwelling) and public standpipe. The country report (p.84(5.7)) adds bottled water and trucked water (from NWC) to the definition of imporved drinking water sources. Furthermore, the report identifies trucked water from private companies as unimporved source of drinking water because of the difficulty in determining the safety of the drinking water from the multiple private companies. The country report summarise that untreated sources of drinkng water are: rainwater tank, well, river/lake/spring/pond or water trucked from private company (p.84(5.7)).*/ gen timetowater = i35_1 replace timetowater = . if timetowater>=999 replace timetowater = timetowater * 1000 if i35_2==1 //convert from kilometers to meters replace timetowater = timetowater * 1609.34 if i35_2==3 //miles to meters replace timetowater = timetowater * 0.9144 if i35_2==4 //yards to meters replace timetowater = timetowater * 20.1168 if i35_2==5 //chains to meters gen water_mdg = 1 if (i27>=1 & i27<=3) | i27==8 | i27==9 | i27==12 /*Non deprived if water is indoor tap/pipe; outside private tap/pipe; public standpipe; trucked water(NWC); bottled water */ replace water_mdg = 0 if i27==4 | i27==5 | i27==6 | i27==7 | i27==10 | i27==11 | i27==13 /*Deprived if it is well; river/lake/spring/pond; rainwater (tank); trucked water (private companies)*/ replace water_mdg = 0 if timetowater>=1000 & timetowater!=. //Deprived if water is at more than 1000 meters (30 minutes walk, roundtrip) lab var water_mdg "Household has drinking water with MDG standards (considering distance)" tab i27 water_mdg, m ******************************************************************************** *** Step 2.8 Housing *** ******************************************************************************** /*Note: In Jamaica, housing was only constructed using information on wall, as the survey did not collect data on floor and roof. The country report included only walls made of concrete block & steel in the housing quality index. The report states that this type of walls has durability for withstanding the elements of weather and for providing occupants with a greater level of security (p.78 (5.1); Table 5.5, p.83 (5.6)). Following the country report, we identify only walls made of concrete block & steel as non-deprived. All other wall materials including wood, stone, brick, cocrete nog, wattle/adobe and others as non-improved. */ /* Members of the household are considered deprived if the household has a dirt, sand or dung floor. Jamaica JSLC 2018 has no data on floor. */ gen floor = . gen floor_imp = . lab var floor_imp "Household has floor that it is not earth/sand/dung" /* Members of the household are considered deprived if the household has wall made of natural & low quality materials. */ gen wall = i2 label def walls 1 "Wood" 2 "Stone" 3 "Brick" 4 "Concrete nog" 5 "Concrete block & steel" 6 "Wattle/Adobe" 7 "Other" label values wall walls gen wall_imp = 1 if wall==3 | wall==4 | wall==5 replace wall_imp = 0 if wall==1 | wall==2 | wall==6 | wall==7 lab var wall_imp "Household has wall that it is not of low quality materials" tab wall wall_imp, m /* Members of the household are considered deprived if the household has roof made of natural & low quality materials. Jamaica JSLC 2018 has no data on roof.*/ gen roof = . gen roof_imp = . lab var roof_imp "Household has roof that it is not of low quality materials" *** Standard MPI *** /* Members of the household is deprived in housing if the roof, floor OR walls are constructed from low quality materials.*/ ************************************************************** gen housing_1 = 1 replace housing_1 = 0 if floor_imp==0 | wall_imp==0 | roof_imp==0 replace housing_1 = . if floor_imp==. & wall_imp==. & roof_imp==. lab var housing_1 "Household has roof, floor & walls that it is not low quality material" tab housing_1, m ******************************************************************************** *** Step 2.9 Cooking Fuel *** ******************************************************************************** /* Solid fuel are solid materials burned as fuels, which includes coal as well as solid biomass fuels (wood, animal dung, crop wastes and charcoal). Source: https://apps.who.int/iris/bitstream/handle/10665/141496/9789241548885_eng.pdf */ gen cookingfuel = i50 label def cookingfuel 1 "Gas" 2 "Electricity" 3 "Wood" 4 "Kerosene" 5 "Charcoal" 6 "Biogas" 7 "Solar" 8 "Other" 9 "None" label values cookingfuel cookingfuel ta cookingfuel, m *** Standard MPI *** /* Members of the household are considered deprived if the household uses solid fuels and solid biomass fuels for cooking. */ ***************************************************************** gen cooking_mdg = 1 if cookingfuel==1 | cookingfuel==2 | cookingfuel==4 | cookingfuel==6 | cookingfuel==7 | cookingfuel==8 | cookingfuel==9 replace cooking_mdg = 0 if cookingfuel==3 | cookingfuel==5 * 3=wood; 5=charcoal lab var cooking_mdg "Househod has cooking fuel according to MDG standards" tab cookingfuel cooking_mdg, m ******************************************************************************** *** Step 2.10 Assets ownership *** ******************************************************************************** /*Assets that are included in the global MPI: Radio, TV, telephone, bicycle, motorbike, refrigerator, car, computer and animal cart */ gen television = i47 gen television2 = j608 gen radio = j607 gen telephone = i40_1 gen mobiletelephone = i40_2 gen mobiletelephone2 = i40_3 gen refrigerator = j604 gen car = j615 gen bicycle = j613 gen motorbike = j614 gen computer = j616 gen animal_cart = . foreach var in television television2 radio telephone mobiletelephone mobiletelephone2 refrigerator car bicycle motorbike computer animal_cart { replace `var' = . if `var'==9 | `var'==99 | `var'==8 | `var'==98 | `var'==0 replace `var' = 0 if `var'==2 } //Group telephone and mobiletelephone as a single variable replace telephone=1 if (mobiletelephone==1 | mobiletelephone2==1) replace television = 1 if television2==1 //Label indicators lab var television "Household has television" lab var radio "Household has radio" lab var telephone "Household has telephone (landline/mobilephone)" lab var refrigerator "Household has refrigerator" lab var car "Household has car" lab var bicycle "Household has bicycle" lab var motorbike "Household has motorbike" lab var computer "Household has computer" lab var animal_cart "Household has animal cart" *** Standard MPI *** /* Members of the household are considered deprived in assets if the household does not own more than one of: radio, TV, telephone, bike, motorbike, refrigerator, computer or animal cart and does not own a car or truck.*/ ***************************************************************************** egen n_small_assets2 = rowtotal(television radio telephone refrigerator bicycle motorbike computer animal_cart), missing lab var n_small_assets2 "Household Number of Small Assets Owned" gen hh_assets2 = (car==1 | n_small_assets2 > 1) replace hh_assets2 = . if car==. & n_small_assets2==. lab var hh_assets2 "Household Asset Ownership: HH has car or more than 1 small assets incl computer & animal cart" ta hh_assets2, m ******************************************************************************** *** Step 2.11 Rename and keep variables for MPI calculation ******************************************************************************** //Retain data on sampling design: clonevar strata = region *clonevar psu = district *label var psu "Primary sampling unit" label var strata "Sample strata" //Retain year, month & date of interview: clonevar year_interview = yy_int clonevar month_interview = mm_int clonevar day_interview = dd_int foreach var in year_interview month_interview day_interview { replace `var'=. if `var'==0 } //Generate presence of subsample gen subsample = . *** Rename key global MPI indicators for estimation *** recode hh_mortality_5y (0=1)(1=0) , gen(d_cm) recode hh_nutrition_uw_st (0=1)(1=0) , gen(d_nutr) recode hh_child_atten (0=1)(1=0) , gen(d_satt) recode hh_years_edu6 (0=1)(1=0) , gen(d_educ) recode electricity (0=1)(1=0) , gen(d_elct) recode water_mdg (0=1)(1=0) , gen(d_wtr) recode toilet_mdg (0=1)(1=0) , gen(d_sani) recode housing_1 (0=1)(1=0) , gen(d_hsg) recode cooking_mdg (0=1)(1=0) , gen(d_ckfl) recode hh_assets2 (0=1)(1=0) , gen(d_asst) /*In this survey, the 'region_01' variable has been harmonised with the earlier survey.*/ clonevar region_01 = region_c *** Keep main variables require for MPI calculation *** keep hh_id ind_id subsample weight area relationship sex age agec7 agec4 hhsize region day_interview d_cm d_nutr d_satt d_educ d_elct d_wtr d_sani d_hsg d_ckfl d_asst hh_mortality_5y hh_nutrition_uw_st hh_child_atten hh_years_edu6 electricity water_mdg toilet_mdg housing_1 cooking_mdg hh_assets2 order hh_id ind_id subsample weight area relationship sex age agec7 agec4 hhsize region day_interview d_cm d_nutr d_satt d_educ d_elct d_wtr d_sani d_hsg d_ckfl d_asst hh_mortality_5y hh_nutrition_uw_st hh_child_atten hh_years_edu6 electricity water_mdg toilet_mdg housing_1 cooking_mdg hh_assets2 *** Generate coutry and survey details for estimation *** char _dta[cty] "Jamaica" char _dta[ccty] "JAM" char _dta[year] "2018" char _dta[survey] "JSLC" char _dta[ccnum] "388" char _dta[type] "micro" char _dta[class] "old_survey" *** Sort, compress and save data for estimation *** sort ind_id compress la da "Micro data for `_dta[ccty]' (`_dta[ccnum]') from `c(current_date)' (`c(current_time)')." save "$path_out/jam_jslc18.dta", replace ******************************************************************************** *** MPI Calculation (TTD file) ******************************************************************************** **SELECT COUNTRY POV FILE RUN ON LOOP FOR MORE COUNTRIES use "$path_out\jam_jslc18.dta", clear ******************************************************************************** *** Define Sample Weight and total population *** ******************************************************************************** gen sample_weight = weight ******************************************************************************** *** List of the 10 indicators included in the MPI *** ******************************************************************************** gen edu_1 = hh_years_edu6 gen atten_1 = hh_child_atten gen cm_1 = hh_mortality_5y gen nutri_1 = hh_nutrition_uw_st gen elec_1 = electricity gen toilet_1 = toilet_mdg gen water_1 = water_mdg gen house_1 = housing_1 gen fuel_1 = cooking_mdg gen asset_1 = hh_assets2 global est_1 edu_1 atten_1 nutri_1 elec_1 toilet_1 water_1 house_1 fuel_1 asset_1 ******************************************************************************** *** List of sample without missing values *** ******************************************************************************** foreach j of numlist 1 { gen sample_`j' = (edu_`j'!=. & atten_`j'!=. & nutri_`j'!=. & elec_`j'!=. & toilet_`j'!=. & water_`j'!=. & house_`j'!=. & fuel_`j'!=. & asset_`j'!=.) replace sample_`j' = . if subsample==0 /* Note: If the anthropometric data was collected from a subsample of the total population that was sampled, then the final analysis only includes the subsample population. */ *** Percentage sample after dropping missing values *** sum sample_`j' [iw = sample_weight] gen per_sample_weighted_`j' = r(mean) sum sample_`j' gen per_sample_`j' = r(mean) } *** ******************************************************************************** *** Define deprivation matrix 'g0' *** which takes values 1 if individual is deprived in the particular *** indicator according to deprivation cutoff z as defined during step 2 *** ******************************************************************************** foreach j of numlist 1 { foreach var in ${est_`j'} { gen g0`j'_`var' = 1 if `var'==0 replace g0`j'_`var' = 0 if `var'==1 } } *** Raw Headcount Ratios foreach j of numlist 1 { foreach var in ${est_`j'} { sum g0`j'_`var' if sample_`j'==1 [iw = sample_weight] gen raw`j'_`var' = r(mean)*100 lab var raw`j'_`var' "Raw Headcount: Percentage of people who are deprived in `var'" } } ******************************************************************************** *** Define vector 'w' of dimensional and indicator weight *** ******************************************************************************** /*If survey lacks one or more indicators, weights need to be adjusted within / each dimension such that each dimension weighs 1/3 and the indicator weights add up to one (100%). CHECK COUNTRY FILE*/ foreach j of numlist 1 { // DIMENSION EDUCATION foreach var in edu_`j' atten_`j' { capture drop w`j'_`var' gen w`j'_`var' = 1/6 } // DIMENSION HEALTH foreach var in nutri_`j' { capture drop w`j'_`var' gen w`j'_`var' = 1/3 } // DIMENSION LIVING STANDARD foreach var in elec_`j' toilet_`j' water_`j' house_`j' fuel_`j' asset_`j' { capture drop w`j'_`var' gen w`j'_`var' = 1/18 } } ******************************************************************************** *** Generate the weighted deprivation matrix 'w' * 'g0' ******************************************************************************** foreach j of numlist 1 { foreach var in ${est_`j'} { gen w`j'_g0_`var' = w`j'_`var' * g0`j'_`var' replace w`j'_g0_`var' = . if sample_`j'!=1 /*The estimation is based only on observations that have non-missing values for all variables in varlist_pov*/ } } ******************************************************************************** *** Generate the vector of individual weighted deprivation count 'c' ******************************************************************************** foreach j of numlist 1 { egen c_vector_`j' = rowtotal(w`j'_g0_*) replace c_vector_`j' = . if sample_`j'!=1 *drop w_g0_* } ******************************************************************************** *** Identification step according to poverty cutoff k (20 33.33 50) *** ******************************************************************************** foreach j of numlist 1 { foreach k of numlist 20 33 50 { gen multidimensionally_poor_`j'_`k' = (c_vector_`j'>=`k'/100) replace multidimensionally_poor_`j'_`k' = . if sample_`j'!=1 //Takes value 1 if individual is multidimensional poor } } ******************************************************************************** *** Generate the censored vector of individual weighted deprivation count 'c(k)' ******************************************************************************** foreach j of numlist 1 { foreach k of numlist 20 33 50 { gen c_censured_vector_`j'_`k' = c_vector_`j' replace c_censured_vector_`j'_`k' = 0 if multidimensionally_poor_`j'_`k'==0 } //Provide a score of zero if a person is not poor } * ******************************************************************************** *** Define censored deprivation matrix 'g0(k)' *** ******************************************************************************** foreach j of numlist 1 { foreach var in ${est_`j'} { gen g0`j'_k_`var' = g0`j'_`var' replace g0`j'_k_`var' = 0 if multidimensionally_poor_`j'_33==0 replace g0`j'_k_`var' = . if sample_`j'!=1 } } ******************************************************************************** *** Generates Multidimensional Poverty Index (MPI), *** Headcount (H) and Intensity of Poverty (A) *** ******************************************************************************** *** Multidimensional Poverty Index (MPI) *** foreach j of numlist 1 { foreach k of numlist 20 33 50 { sum c_censured_vector_`j'_`k' [iw = sample_weight] if sample_`j'==1 gen MPI_`j'_`k' = r(mean) lab var MPI_`j'_`k' "MPI with k=`k'" } sum c_censured_vector_`j'_33 [iw = sample_weight] if sample_`j'==1 gen MPI_`j' = r(mean) lab var MPI_`j' "`j' Multidimensional Poverty Index (MPI = H*A): Range 0 to 1" *** Headcount (H) *** sum multidimensionally_poor_`j'_33 [iw = sample_weight] if sample_`j'==1 gen H_`j' = r(mean)*100 lab var H_`j' "`j' Headcount ratio: % Population in multidimensional poverty (H)" *** Intensity of Poverty (A) *** sum c_censured_vector_`j'_33 [iw = sample_weight] if multidimensionally_poor_`j'_33==1 & sample_`j'==1 gen A_`j' = r(mean)*100 lab var A_`j' "`j' Intensity of deprivation among the poor (A): Average % of weighted deprivations" *** Population vulnerable to poverty (who experience 20-32.9% intensity of deprivations) *** gen temp = 0 replace temp = 1 if c_vector_`j'>=0.2 & c_vector_`j'<0.3332 replace temp = . if sample_`j'!=1 sum temp [iw = sample_weight] gen vulnerable_`j' = r(mean)*100 lab var vulnerable_`j' "`j' % Population vulnerable to poverty (who experience 20-32.9% intensity of deprivations)" drop temp *** Population in severe poverty (with intensity 50% or higher) *** gen temp = 0 replace temp = 1 if c_vector_`j'>0.49 replace temp = . if sample_`j'!=1 sum temp [iw = sample_weight] gen severe_`j' = r(mean)*100 lab var severe_`j' "`j' % Population in severe poverty (with intensity 50% or higher)" drop temp } * *** Censored Headcount *** foreach j of numlist 1 { foreach var in ${est_`j'} { sum g0`j'_k_`var' [iw = sample_weight] if sample_`j'==1 gen cen`j'_`var' = r(mean)*100 lab var cen`j'_`var' "Censored Headcount: Percentage of people who are poor and deprived in `var'" } } *** Dimensional Contribution *** foreach j of numlist 1 { foreach var in ${est_`j'} { gen cont`j'_`var' = (w`j'_`var' * cen`j'_`var')/MPI_`j' if sample_`j'==1 lab var cont`j'_`var' "% Contribution in MPI of indicator..." } } ** The line below produces the variance (inequality among the poor) ** sum c_vector_1 if c_vector_1>=1/3 & c_vector_1<=1 [aw = sample_weight], detail gen var=r(Var) *** Prepare results to export *** keep /*country year survey*/ per_sample_weighted* per_sample* MPI* H* A* vulnerable* severe* raw* cen* cont* var *gen temp = (_n) *keep if temp==1 *drop temp order MPI_1 H_1 A_1 var severe_1 vulnerable_1 cont1_nutr cont1_edu_1 cont1_atten_1 cont1_fuel_1 cont1_toilet_1 cont1_water_1 cont1_elec_1 cont1_house_1 cont1_asset_1 per_sample_1 per_sample_weighted_1 raw1_nutri_1 raw1_edu_1 raw1_atten_1 raw1_fuel_1 raw1_toilet_1 raw1_water_1 raw1_elec_1 raw1_house_1 raw1_asset_1 cen1_nutri_1 cen1_edu_1 cen1_atten_1 cen1_fuel_1 cen1_toilet_1 cen1_water_1 cen1_elec_1 cen1_house_1 cen1_asset_1 codebook, compact